﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace PersonnelSystemManagement.人事管理
{
    /// <summary>
    /// 部门表
    /// </summary>
    public class Department
    {
        /// <summary>
        /// 部门 ID，主键
        /// </summary>
        [Key]
        public int id { get; set; }

        /// <summary>
        /// 部门名称
        /// </summary>
        [StringLength(50, ErrorMessage = "部门名称长度不能超过 50 个字符")]
        public string? DeptName { get; set; }

        /// <summary>
        /// 上级部门ID
        /// </summary>
        public int? DeptId { get; set; }
    }
}
